<template>
  <div class="form-row">
    <span class="label">{{inputObject.label}}：</span>
    <input v-if="inputObject.valueType === 'Text'" type="text" v-model="inputObject.val" :placeholder="inputObject.placeHolder">
    <textarea v-if="inputObject.valueType === 'MutiText'" type="text" v-model="inputObject.val" :placeholder="inputObject.placeHolder"></textarea>
    <select v-if="inputObject.valueType === 'List'" v-model="inputObject.val" :placeholder="inputObject.placeHolder">
      <option v-for="item in inputObject.options.split(',')" :key="item" :value="item">{{item}}</option>
    </select>
  </div>
</template>

<script>
export default {
  props: ['inputObject'],
}
</script>

<style lang="scss" scoped>
  .form-row{
    margin-top: 24px;
    .label{
      font-size: 16px;
      color: #262626;
    }
    select{
      width: 408px;
      height: 32px;
      border-radius: 2px;
      border: 1px solid #BFBFBF;
      padding-left: 12px;
    }
    option{
      line-height: 32px;
    }
    input{
      width: 408px;
      height: 32px;
      border-radius: 2px;
      border: 1px solid #BFBFBF;
      padding-left: 12px;
    }
    .tip{
      font-size: 14px;
      font-weight: 400;
      color: red;
    }
    textarea{
      width: 548px;
      height: 102px;
      font-size: 14px;
      font-weight: 400;
      border: 1px solid #BFBFBF;
      padding: 8px;
      border-radius: 2px;
      resize:none;
      vertical-align: top;
    }
    .people{
      display: inline-block;
      border-radius: 2px;
      border: 1px solid rgba(0, 0, 0, 0.15);
      font-size: 14px;
      color: rgba(0, 0, 0, 0.65);
      line-height: 24px;
      padding: 0 30px 0 8px;
      position: relative;
      border-radius: 2px;
      margin-right: 5px;
      .btn{
        position: absolute;
        right:5px;
        top:6px;
        width: 13px;
        height: 13px;
        background: #D9D9D9;
        color: white;
        cursor: pointer;
        border-radius: 50%;
        line-height: 13px;
        i{
          font-size: 12px;
        }
      }
    }
    .add-btn{
      cursor: pointer;
      font-size: 22px;
      vertical-align: middle;
      margin-left:11px;
      color: #1890FF;
    }
  }
</style>